package com.hbt.myplus.mapper;

import com.hbt.myplus.model.Drug;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author astupidcoder
 * @since 2020-12-22
 */
public interface DrugMapper extends BaseMapper<Drug> {

    @Select("select *,b.id as relate_id from drug a, reg_drug b where b.drug_id = a.id and b.reg_id = #{param1}")
    public List<Drug> getDrugListByRegId(int regId);
}
